package net.xdclass.service;

import net.xdclass.entity.CouponRecord;
import com.baomidou.mybatisplus.extension.service.IService;
import net.xdclass.model.CouponRecordMessage;
import net.xdclass.request.LockCouponRecordRequest;
import net.xdclass.utils.JsonData;
import net.xdclass.vo.CouponRecordVO;

import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lixin
 * @since 2024-08-23
 */
public interface ICouponRecordService extends IService<CouponRecord> {

    /**
     * 分页查询领券记录
     * @param page
     * @param size
     * @return
     */
    Map<String, Object> page(int page, int size);

    /**
     * 根据id找详情
     * @param recordId
     * @return
     */
    CouponRecordVO findByid(long recordId);

    /**
     * 锁定优惠券
     * @param recordRequest
     * @return
     */
    JsonData lockCouponRecords(LockCouponRecordRequest recordRequest);

    /**
     * 释放优惠券记录
     * @param recordMessage
     * @return
     */
    boolean releaseCouponRecord(CouponRecordMessage recordMessage);
}
